<template>
    <el-card class="box-card" shadow="never">
        <!--表格树内容栏-->
        <el-table :data="tableData" stripe size="mini" style="width: 100%;" element-loading-spinner="el-icon-loading"
            element-loading-background="rgba(255, 255, 255, 0.8)" v-loading="loading" element-loading-text="拼命加载中">
            <el-table-column prop="roleCode" header-align="center" align="center" label="角色编码">
            </el-table-column>
            <el-table-column prop="roleName" header-align="center" align="center" label="角色名称">
            </el-table-column>
            <el-table-column header-align="center" align="center" label="状态">
                <template slot-scope="scope">
                    <el-tag v-if="scope.row.status == 0" size="small">禁用</el-tag>
                    <el-tag v-else-if="scope.row.status = 1" size="small" type="success">启用</el-tag>
                    <!-- <el-tag v-else-if="scope.row.type == 2" size="small" type="info">按钮</el-tag> -->
                </template>
            </el-table-column>
            <el-table-column fixed="right" header-align="center" align="center" width="240" label="操作">
                <template slot-scope="scope">
                    <a @click="handleEdit(scope.row)">授权</a>
                </template>
            </el-table-column>
        </el-table>
        <PermissionsDialog ref="modalForm" @ok="modalFormOk" />
    </el-card>
</template>

<script>
    import {
        JeecgListMixin
    } from '@/utils/permisson/JeecgListMixin.js'
    import PermissionsDialog from './modules/PermissionsDialog.vue'
    export default {
        name: "PermissionsList",
        mixins: [JeecgListMixin],
        components: {
            PermissionsDialog
        },
        data() {
            return {
                tableData: [],

                url: {
                    list: "/sysuser/getRoles",
                },
            };
        },
        methods: {
        }
    }
</script>

<style scoped>
    a {
        color: #1890FF;
        cursor: pointer;
    }

</style>
